package com.xiangge.lianxi;

public class Demo6 {
    public static void main(String[] args) {

        /*for (int i = 100; i < 999; i++) {
            int bai = i / 100;
            int shi = i % 100 / 10;
            int ge = i % 100 % 10;
//            System.out.println(i+","+bai+","+shi+","+ge);


            int i1 = bai*bai*bai + shi*shi*shi + ge*ge*ge;


            if (i==i1){
                System.out.print(i1+",");
//                sum = sum + i1;
            }
        }*/

        int i = 100;
        while (i<999){

            int bai = i / 100;
            int shi = i % 100 / 10;
            int ge = i % 100 % 10;
//            System.out.println(i+","+bai+","+shi+","+ge);


            int i1 = bai*bai*bai + shi*shi*shi + ge*ge*ge;


            if (i==i1){
                System.out.print(i1+",");
//                sum = sum + i1;
            }

            i++;
        }

    }
}
